package org.shuma.supplier.handler;

import com.baomidou.mybatisplus.core.handlers.MetaObjectHandler;
import org.apache.ibatis.reflection.MetaObject;
import org.springframework.stereotype.Component;

/**
 * @author :Wjh
 * @since :2024/6/19 下午8:05
 */

@Component
public class MyMetaObjectHandler implements MetaObjectHandler {
    @Override
    public void insertFill(MetaObject metaObject) {
        //添加deleted的初始值为0，也就是默认值
        this.setFieldValByName("is_delete", 0, metaObject);
    }

    @Override
    public void updateFill(MetaObject metaObject) {
    }
}
